package org.sample.springboot.verifier;

import org.sample.springboot.model.Contact;

import java.util.function.Consumer;

import static org.junit.Assert.assertEquals;

public class ContactVerifier extends Verifier<Contact> {

	private ContactVerifier() {

	}

	public static interface ContactPropVerifier extends Consumer<Contact> {

	}

	public static ContactVerifier expect(ContactPropVerifier... propVerifiers) {
		ContactVerifier verifier = new ContactVerifier();
		verifier.propVerifiers = propVerifiers;
		return verifier;
	}

	public static ContactPropVerifier phone(String phone) {
		return obj -> assertEquals(phone, obj.getPhone());
	}

	public static ContactPropVerifier email(String email) {
		return obj -> assertEquals(email, obj.getEmail());
	}

}
